package com.server.util;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

public class Config {
	
	public static String port = getProperties();
	
	public static String getProperties() {
		if (port == null || port.isEmpty()) {
			Properties properties = new Properties();
			try {
				properties.load(new FileInputStream(new File("config.properties")));
				return properties.getProperty("port");
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
		return port;
	}

}
